package com.lzy.api.controller.admin;


import com.lzy.grace.result.GraceJSONResult;
import com.lzy.pojo.Category;
import com.lzy.pojo.bo.SaveCategoryBO;
import com.lzy.pojo.bo.SaveFriendLinkBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

@Api(value = "文章管理维护",tags = {"文章管理维护的controller"})
@RequestMapping("categoryMng")
public interface CategoryMngControllerApi {

    @ApiOperation(value = "新增或者修改文章分类",notes = "新增或者修改文章分类",httpMethod = "POST")
    @PostMapping("/saveOrUpdateCategory")
    public GraceJSONResult saveOrUpdateCategory(@RequestBody @Valid SaveCategoryBO newCategoryBO);

    @PostMapping("/getCatList")
    @ApiOperation(value = "查询分类列表", notes = "查询分类列表", httpMethod = "POST")
    public GraceJSONResult getCatList();

    @GetMapping("/getCats")
    @ApiOperation(value = "查询文章分类", notes = "查询文章分类", httpMethod = "GET")
    public GraceJSONResult getCats();

}
